﻿using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ozone.Models
{

    public class S10SetupPanelParam
    {
        public List<ParamVal> lstParam { get; set; } = new List<ParamVal>();

        public string getVal(string tag)
        {
            for(int i=0;i<lstParam.Count;i++)
            {
                if (lstParam[i].FDataID == tag)
                    return lstParam[i].FValue;
            }

            return "";
        }

        public void setVal(string tag,string val)
        {
            for (int i = 0; i < lstParam.Count; i++)
            {
                if (lstParam[i].FDataID == tag)
                {
                    lstParam[i].FValue = val;
                    return;
                }
            }
            ParamVal p = new ParamVal();
            p.FDataID = tag;
            p.FValue = val;

            lstParam.Add(p);
        }
    }

    public class S10ParamRealData
    {
        public RD_S10 realData { set; get; }
        public S10SetupPanelParam setupParam { set; get; }
    }
}
